package com.njbdqn.mydemo.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.njbdqn.mydemo.vo.Scores;
import com.njbdqn.mydemo.vo.Students;

public interface IStudentsDAO {
	@Select("select * from students")
	public List<Students> findAll();
	
	@Delete("delete from students where stuid=#{stid}")
	public void delStudent(int stid);
	
	@Insert("insert into students(stuname,birthday,photo) values(#{stuname},#{birthday},#{photo})")
	public void saveStu(Students stu);
	
	@Select("select * from scores where stuid=#{stuid}")
	public List<Scores> findScoresByUserid(int stuid);
	
	public void updateStudent(Students stu);
	public Students findById(int stuid);
	
}
